﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace HelloMVC.Controllers
{
    public class TestController : Controller
    {
        // GET: Test
        public ActionResult Index()
        {
            return View();
        }
        public string Hello(string Name)
        {
            return "Hello, " + Name;
        }
        public ActionResult InputForm()
        {
            return View();
            //;feud
        }

        public ActionResult TriangleArea()
        {
            return View();
        }

        [HttpPost]
        public ActionResult TriangleArea(double baseLength, double height)
        {
            double area = 0.5 * baseLength * height;
            ViewBag.Area = area;
            return View();
        }
    }
}